import random


def get_number_id_by(length: int):
    zero_list = ['0' for i in range(length)]
    zero_str = "".join(zero_list)
    max = int(f"1{zero_str}") - 1
    nine_str = zero_str.replace("0", "9")
    min = int(f"{nine_str[:-1]}") + 1
    return random.randint(min, max)


if __name__ == "__main__":
    by = get_number_id_by(18)
    print(by)
